Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

124
Vistas
Not sending image for a specific role | Discord.js and canvas

I don't know how to describe this problem, but I just know that it doesn't work on canvas when I want an image for a specific role:

if (interaction.member.roles.cache.has('980553630782464068') === user.id) list2.push("MODERATOR");
          .replace("MODERATOR", "Moderator", user.id)

It turns out that the image does not appear on the canvas, and this error has been happening for a long time.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Assuming interaction is an Interaction, interaction.member.roles.cache.has() returns a boolean, and user.id is a Snowflake, so they're never going to be strictly equal (since === always returns false for two arguments of differing types), and thus the if statement will never execute the code within it.

if (interaction.member.roles.cache.has('980553630782464068')) is probably what you're looking for, that checks if the person who caused interaction has the role with the id 980553630782464068.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda